import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/components/Layout'
import Index from '@/components/Index'
import Head from '@/components/Head'
import TransferOrderList from '@/components/TransferOrderList'
import TransferOrderDetail from '@/components/TransferOrderDetail'
import HeadInfo from '@/components/HeadInfo'
import TaskProgress from '@/components/TaskProgress'
import Home from '@/components/Home'
import HospitalList from '@/components/HospitalList'
import ToldInfo from '@/components/ToldInfo'
import TransferOrderListHead from '@/components/TransferOrderListHead'
import InfectiousOrderList from '@/components/InfectiousOrderList'
import InfectiousOrderDetail from '@/components/InfectiousOrderDetail'
import InfectiousOrderListHead from '@/components/InfectiousOrderListHead'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'Layout',
    component: Layout,
    children: [{
        path: '',
        name: 'Index',
        components: {
          default: Index,
          viewHead: Head
        }
      },
      {
        path: 'TransferOrderList',
        name: 'TransferOrderList',
        components: {
          default: TransferOrderList,
          viewHead: TransferOrderListHead
        }
      },
      {
        path: 'TransferOrderDetail',
        name: 'TransferOrderDetail',
        components: {
          default: TransferOrderDetail,
          viewHead: Head
        }
      },
      {
        path: 'InfectiousOrderList',
        name: 'InfectiousOrderList',
        components: {
          default: InfectiousOrderList,
          viewHead: InfectiousOrderListHead
        }
      },
      {
        path: 'InfectiousOrderDetail',
        name: 'InfectiousOrderDetail',
        components: {
          default: InfectiousOrderDetail,
          viewHead: Head
        }
      },
      {
        path: 'Home',
        name: 'Home',
        components: {
          default: Home,
          viewHead: HeadInfo
        },
        children: [{
            path: 'TaskProgress',
            name: 'TaskProgress',
            component: TaskProgress
          },
          {
            path: 'HospitalList',
            name: 'HospitalList',
            component: HospitalList
          },
          {
            path: 'ToldInfo',
            name: 'ToldInfo',
            component: ToldInfo
          }
        ]
      }
    ]
  }]
})
